package com.wuyou.dynamic.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.persistence.GeneratedValue;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Statement
 *
 * @Date 2025-11-06 15:02
 * @Author 无忧
 */
@TableName(value = "`statement`")
@Data
public class Statement {

    /**
     * 主键
     */
    @TableId
    @GeneratedValue(generator = "JDBC")
    private Long id;

    /**
     * 租户
     */
    @TableField (value = "`tenant_id`")
    private Long tenantId;

    /**
     * 结算单号
     */
    @TableField (value = "`no`")
    private String no;

    /**
     * 对账单的主单id
     */
    @TableField (value = "`parent_id`")
    private Long parentId;

    /**
     * 主单下子单结算单编号拼接
     */
    @TableField (value = "`child_nos`")
    private String childNos;

    /**
     * 运单id
     */
    @TableField (value = "`logistics_id`")
    private Long logisticsId;

    /**
     * 运单单号
     */
    @TableField (value = "`logistics_no`")
    private String logisticsNo;

    /**
     * 状态(1-已接单、2-业务完成、3-未复核、4-已复核、5-已关账、6-开票完成、7-销账完成)
     */
    @TableField (value = "`status`")
    private Integer status;

    /**
     * 类型(1-进口清关、2-运输、3-仓储、4-贸易、10-LCL、11-CONSOL、12-COLOAD、13-FCL)
     */
    @TableField (value = "`type`")
    private Integer type;

    /**
     * 所属公司id
     */
    @TableField (value = "`owner_id`")
    private Long ownerId;

    /**
     * 所属公司名称
     */
    @TableField (value = "`owner_name`")
    private String ownerName;

    /**
     * 委托人企业id
     */
    @TableField (value = "`client_id`")
    private Long clientId;

    /**
     * 委托人企业名称
     */
    @TableField (value = "`client_name`")
    private String clientName;

    /**
     * 币种code
     */
    @TableField (value = "`currency`")
    private String currency;

    /**
     * 币种名称
     */
    @TableField (value = "`currency_name`")
    private String currencyName;

    /**
     * 币种符号
     */
    @TableField (value = "`currency_symbol`")
    private String currencySymbol;

    /**
     * 预估收入金额
     */
    @TableField (value = "`estimate_income_amount`")
    private BigDecimal estimateIncomeAmount;

    /**
     * 预估成本金额
     */
    @TableField (value = "`estimate_cost_amount`")
    private BigDecimal estimateCostAmount;

    /**
     * 预估利润金额
     */
    @TableField (value = "`estimate_profit_amount`")
    private BigDecimal estimateProfitAmount;

    /**
     * 预估完成时间
     */
    @TableField (value = "`estimate_complete_time`")
    private Date estimateCompleteTime;

    /**
     * 是否预估完成(0/false-未完成、1/true-已完成)
     */
    @TableField (value = "`is_estimate_complete`")
    private Boolean isEstimateComplete;

    /**
     * 不含税收入总金额
     */
    @TableField (value = "`untaxed_income_amount`")
    private BigDecimal untaxedIncomeAmount;

    /**
     * 不含税成本总金额
     */
    @TableField (value = "`untaxed_cost_amount`")
    private BigDecimal untaxedCostAmount;

    /**
     * 不含税利润总金额
     */
    @TableField (value = "`untaxed_profit_amount`")
    private BigDecimal untaxedProfitAmount;

    /**
     * 收入总金额
     */
    @TableField (value = "`income_amount`")
    private BigDecimal incomeAmount;

    /**
     * 成本总金额
     */
    @TableField (value = "`cost_amount`")
    private BigDecimal costAmount;

    /**
     * 利润总金额
     */
    @TableField (value = "`profit_amount`")
    private BigDecimal profitAmount;

    /**
     * 单柜利润总金额
     */
    @TableField (value = "`single_cabinet_profit_amount`")
    private BigDecimal singleCabinetProfitAmount;

    /**
     * 代收代付总金额
     */
    @TableField (value = "`proxy_amount`")
    private BigDecimal proxyAmount;

    /**
     * 收入未确认总金额
     */
    @TableField (value = "`income_unconfirmed_amount`")
    private BigDecimal incomeUnconfirmedAmount;

    /**
     * 收入减免总金额
     */
    @TableField (value = "`income_discount_amount`")
    private BigDecimal incomeDiscountAmount;

    /**
     * 收入不含税减免总金额
     */
    @TableField (value = "`income_untaxed_discount_amount`")
    private BigDecimal incomeUntaxedDiscountAmount;

    /**
     * 收入确认总金额
     */
    @TableField (value = "`income_confirmed_amount`")
    private BigDecimal incomeConfirmedAmount;

    /**
     * 收入未开票总金额
     */
    @TableField (value = "`income_not_invoiced_amount`")
    private BigDecimal incomeNotInvoicedAmount;

    /**
     * 收入开票中总金额
     */
    @TableField (value = "`income_invoicing_amount`")
    private BigDecimal incomeInvoicingAmount;

    /**
     * 收入已开票总金额
     */
    @TableField (value = "`income_invoiced_amount`")
    private BigDecimal incomeInvoicedAmount;

    /**
     * 收入未核销总金额
     */
    @TableField (value = "`income_not_written_off_amount`")
    private BigDecimal incomeNotWrittenOffAmount;

    /**
     * 收入可核销总金额(已开票未核销)
     */
    @TableField (value = "`income_can_written_off_amount`")
    private BigDecimal incomeCanWrittenOffAmount;

    /**
     * 收入已核销总金额
     */
    @TableField (value = "`income_written_off_amount`")
    private BigDecimal incomeWrittenOffAmount;

    /**
     * 收入调账中金额
     */
    @TableField (value = "`income_adjustment_amount`")
    private BigDecimal incomeAdjustmentAmount;

    /**
     * 收入未开票准坏账金额
     */
    @TableField (value = "`income_not_invoice_quasi_bad_debts_amount`")
    private BigDecimal incomeNotInvoiceQuasiBadDebtsAmount;

    /**
     * 收入已开票准坏账金额
     */
    @TableField (value = "`income_invoiced_quasi_bad_debts_amount`")
    private BigDecimal incomeInvoicedQuasiBadDebtsAmount;

    /**
     * 收入准坏账金额
     */
    @TableField (value = "`income_quasi_bad_debts_amount`")
    private BigDecimal incomeQuasiBadDebtsAmount;

    /**
     * 预计账单复核完成时间
     */
    @TableField (value = "`expected_receivable_review_complete_time`")
    private Date expectedReceivableReviewCompleteTime;

    /**
     * 预计账单确认时间
     */
    @TableField (value = "`expected_receivable_confirm_time`")
    private Date expectedReceivableConfirmTime;

    /**
     * 预计收款时间
     */
    @TableField (value = "`expected_receipt_time`")
    private Date expectedReceiptTime;

    /**
     * 收入账单编号(多个账单逗号隔开)
     */
    @TableField (value = "`income_receivable_nos`")
    private String incomeReceivableNos;

    /**
     * 收入账单生成时间
     */
    @TableField (value = "`income_receivable_generate_time`")
    private Date incomeReceivableGenerateTime;

    /**
     * 收入对账完成时间
     */
    @TableField (value = "`income_receivable_complete_time`")
    private Date incomeReceivableCompleteTime;

    /**
     * 收入账单创建人
     */
    @TableField (value = "`income_receivable_creator`")
    private Long incomeReceivableCreator;

    /**
     * 收入账单创建人名称
     */
    @TableField (value = "`income_receivable_creator_name`")
    private String incomeReceivableCreatorName;

    /**
     * 收入开票完成时间
     */
    @TableField (value = "`income_invoice_complete_time`")
    private Date incomeInvoiceCompleteTime;

    /**
     * 收入收款完成时间
     */
    @TableField (value = "`income_receipt_complete_time`")
    private Date incomeReceiptCompleteTime;

    /**
     * 成本调账中金额
     */
    @TableField (value = "`cost_adjustment_amount`")
    private BigDecimal costAdjustmentAmount;

    /**
     * 是否收入关闭(0/false-未关闭、1/true-已关闭)
     */
    @TableField (value = "`is_income_closed`")
    private Boolean incomeClosed;

    /**
     * 收入关闭人
     */
    @TableField (value = "`income_closer`")
    private Long incomeCloser;

    /**
     * 收入关闭人名称
     */
    @TableField (value = "`income_closer_name`")
    private String incomeCloserName;

    /**
     * 收入关闭时间
     */
    @TableField (value = "`income_close_time`")
    private Date incomeCloseTime;

    /**
     * 收入补录关闭按钮(0/false打开，1/true关闭)
     */
    @TableField (value = "`income_make_up_lock`")
    private Boolean incomeMakeUpLock;

    /**
     * 收入补录关闭人
     */
    @TableField (value = "`income_make_up_closer`")
    private Long incomeMakeUpCloser;

    /**
     * 收入补录关闭人名称
     */
    @TableField(value = "`income_make_up_closer_name`")
    private String incomeMakeUpCloserName;

    /**
     * 收入补录关闭时间
     */
    @TableField(value = "`income_make_up_close_time`")
    private Date incomeMakeUpCloseTime;

    /**
     * 是否成本关闭(0/false-未关闭、1/true-已关闭)
     */
    @TableField (value = "`is_cost_closed`")
    private Boolean costClosed;

    /**
     * 成本关闭人
     */
    @TableField (value = "`cost_closer`")
    private Long costCloser;

    /**
     * 成本关闭人名称
     */
    @TableField (value = "`cost_closer_name`")
    private String costCloserName;

    /**
     * 成本关闭时间
     */
    @TableField (value = "`cost_close_time`")
    private Date costCloseTime;

    /**
     * 成本补录关闭按钮(0/false打开，1/true关闭)
     */
    @TableField (value = "`cost_make_up_lock`")
    private Boolean costMakeUpLock;

    /**
     * 成本补录关闭人
     */
    @TableField (value = "`cost_make_up_closer`")
    private Long costMakeUpCloser;

    /**
     * 成本补录关闭人名称
     */
    @TableField (value = "`cost_make_up_closer_name`")
    private String costMakeUpCloserName;

    /**
     * 成本补录关闭时间
     */
    @TableField (value = "`cost_make_up_close_time`")
    private Date costMakeUpCloseTime;

    /**
     * 复核人
     */
    @TableField (value = "`reviewer`")
    private Long reviewer;

    /**
     * 复核人名称
     */
    @TableField (value = "`reviewer_name`")
    private String reviewerName;

    /**
     * 复核时间
     */
    @TableField (value = "`review_time`")
    private Date reviewTime;

    /**
     * 复核备注
     */
    @TableField (value = "`review_remark`")
    private String reviewRemark;

    /**
     * 关账人
     */
    @TableField (value = "`closer`")
    private Long closer;

    /**
     * 关账人名称
     */
    @TableField (value = "`closer_name`")
    private String closerName;

    /**
     * 关账时间
     */
    @TableField (value = "`closer_time`")
    private Date closerTime;

    /**
     * 是否账单复核(0/false-未复核、1/true-已复核)
     */
    @TableField (value = "`is_receivable_review`")
    private Boolean receivableReview;

    /**
     * 复核时间
     */
    @TableField (value = "`receivable_review_time`")
    private Date receivableReviewTime;

    /**
     * 备注
     */
    @TableField (value = "`remark`")
    private String remark;

    /**
     * 历史营销部门id
     */
    @TableField (value = "`old_marketing_department_id`")
    private Long oldMarketingDepartmentId;

    /**
     * 历史营销部门名称
     */
    @TableField (value = "`old_marketing_department_name`")
    private String oldMarketingDepartmentName;

    /**
     * 历史客服部门id
     */
    @TableField (value = "`old_customer_department_id`")
    private Long oldCustomerDepartmentId;

    /**
     * 历史客服部门名称
     */
    @TableField (value = "`old_customer_department_name`")
    private String oldCustomerDepartmentName;

    /**
     * 营销部门id
     */
    @TableField (value = "`marketing_department_id`")
    private Long marketingDepartmentId;

    /**
     * 营销部门名称
     */
    @TableField (value = "`marketing_department_name`")
    private String marketingDepartmentName;

    /**
     * 客服部门id
     */
    @TableField (value = "`customer_department_id`")
    private Long customerDepartmentId;

    /**
     * 客服部门名称
     */
    @TableField (value = "`customer_department_name`")
    private String customerDepartmentName;

    /**
     * 主销售员id
     */
    @TableField (value = "`main_salesperson_id`")
    private Long mainSalespersonId;

    /**
     * 主销售员名称
     */
    @TableField (value = "`main_salesperson_name`")
    private String mainSalespersonName;

    /**
     * 从销售员一id
     */
    @TableField (value = "`joint_salesperson_one_id`")
    private Long jointSalespersonOneId;

    /**
     * 从销售员一名称
     */
    @TableField (value = "`joint_salesperson_one_name`")
    private String jointSalespersonOneName;

    /**
     * 从销售员二id
     */
    @TableField (value = "`joint_salesperson_two_id`")
    private Long jointSalespersonTwoId;

    /**
     * 从销售员二名称
     */
    @TableField (value = "`joint_salesperson_two_name`")
    private String jointSalespersonTwoName;

    /**
     * 客服专员id
     */
    @TableField (value = "`customer_commissioner_id`")
    private Long customerCommissionerId;

    /**
     * 客服专员名称
     */
    @TableField (value = "`customer_commissioner_name`")
    private String customerCommissionerName;

    /**
     * 客服经理id
     */
    @TableField (value = "`customer_manager_id`")
    private Long customerManagerId;

    /**
     * 客服经理名称
     */
    @TableField (value = "`customer_manager_name`")
    private String customerManagerName;

    /**
     * 结算员id
     */
    @TableField (value = "`settlement_clerk_id`")
    private Long settlementClerkId;

    /**
     * 结算员名称
     */
    @TableField (value = "`settlement_clerk_name`")
    private String settlementClerkName;

    /**
     * 授权结算员id
     */
    @TableField (value = "`authorized_settlement_clerk_id`")
    private Long authorizedSettlementClerkId;

    /**
     * 授权结算员名称
     */
    @TableField (value = "`authorized_settlement_clerk_name`")
    private String authorizedSettlementClerkName;

    /**
     * 制单员id
     */
    @TableField (value = "`maker_id`")
    private Long makerId;

    /**
     * 制单员名称
     */
    @TableField (value = "`maker_name`")
    private String makerName;

    /**
     * 换单员id
     */
    @TableField (value = "`change_order_id`")
    private Long changeOrderId;

    /**
     * 换单员名称
     */
    @TableField (value = "`change_order_name`")
    private String changeOrderName;

    /**
     * wms系统推送的原始结算单号
     */
    @TableField (value = "`wms_settlement_no`")
    private String wmsSettlementNo;

    /**
     * 删除标志(0/false-未删除、1/true-已删除)
     */
    @TableField (value = "`is_deleted`")
    private Boolean deleted;

    /**
     * 修改人
     */
    @TableField (value = "`modifier`")
    private Long modifier;

    /**
     * 修改时间
     */
    @TableField (value = "`modify_time`")
    private Date modifyTime;

    /**
     * 创建人
     */
    @TableField (value = "`creator`")
    private Long creator;

    /**
     * 创建人名称
     */
    @TableField (value = "`creator_name`")
    private String creatorName;

    /**
     * 创建人公司id
     */
    @TableField (value = "`create_enterprise_id`")
    private Long createEnterpriseId;

    /**
     * 创建时间
     */
    @TableField (value = "`create_time`")
    private Date createTime;

    /**
     * 是否众贸海关联企业
     */
    @TableField (value = "`statement_zmh_relation_flag`")
    private Boolean statementZmhRelationFlag;

    @TableField(exist = false)
    private String mblNo;
}
